var logicPrefab : Transform;
var passionPrefab : Transform;
var ethicsPrefab : Transform;
var deceptionPrefab : Transform;



function MakeBlock(towerConnect:Tower,type:String){
	switch (towerConnect.teamNum)
	{
		case 1:
			if (type==("Logic")){
				logicBlockClone=Instantiate(logicPrefab,transform.position,transform.rotation);
				towerConnect.AddBlock(logicBlockClone.GetComponent("TowerBlock"));
			}
			
			if (type==("Passion")){
				passionBlockClone=Instantiate(passionPrefab,transform.position,transform.rotation);
				towerConnect.AddBlock(passionBlockClone.GetComponent("TowerBlock"));
			}
			
			if (type==("Ethics")){
				ethicsBlockClone=Instantiate(ethicsPrefab,transform.position,transform.rotation);
				towerConnect.AddBlock(ethicsBlockClone.GetComponent("TowerBlock"));
			}
			
			if (type==("Deception")){
				deceptionBlockClone=Instantiate(deceptionPrefab,transform.position,transform.rotation);
				towerConnect.AddBlock(deceptionBlockClone.GetComponent("TowerBlock"));
			}
			break;
		case 2:
			if (type==("Logic")){
				logicBlockClone=Instantiate(logicPrefab,transform.position,transform.rotation);
				towerConnect.AddBlock(logicBlockClone.GetComponent("TowerBlock"));
			}
			
			if (type==("Passion")){
				passionBlockClone=Instantiate(passionPrefab,transform.position,transform.rotation);
				towerConnect.AddBlock(passionBlockClone.GetComponent("TowerBlock"));
			}
			
			if (type==("Ethics")){
				ethicsBlockClone=Instantiate(ethicsPrefab,transform.position,transform.rotation);
				towerConnect.AddBlock(ethicsBlockClone.GetComponent("TowerBlock"));
			}
			
			if (type==("Deception")){
				deceptionBlockClone=Instantiate(deceptionPrefab,transform.position,transform.rotation);
				towerConnect.AddBlock(deceptionBlockClone.GetComponent("TowerBlock"));
			}
	}
}
	
	function makeInitialBlocks(type:String,startingSizeBuff,towerConnect:Tower)
	{
		if(type == "Logic")
		{
			//Debug.Log("Making a Logic Block");
			logicBlockClone=Instantiate(logicPrefab,transform.position,transform.rotation);
			curTower=logicBlockClone.GetComponent("TowerBlock");
			curBlockSize= curTower.GetBlockSize();
			curTower.SetBlockSize( (curBlockSize/2) + parseInt((curBlockSize/2)*(startingSizeBuff/100.0)));
			towerConnect.AddBlock(curTower);
		}
		
		else if(type == "Deception")
		{
			deceptionBlockClone=Instantiate(deceptionPrefab,transform.position,transform.rotation);
			curTower=deceptionBlockClone.GetComponent("TowerBlock");
			curBlockSize= curTower.GetBlockSize();
			curTower.SetBlockSize( (curBlockSize/2) + parseInt((curBlockSize/2)*(startingSizeBuff/100.0)));
			towerConnect.AddBlock(curTower);
		}
		
		else if(type == "Ethics")
		{
			ethicsBlockClone=Instantiate(ethicsPrefab,transform.position,transform.rotation);
			curTower=ethicsBlockClone.GetComponent("TowerBlock");
			curBlockSize= curTower.GetBlockSize();
			curTower.SetBlockSize( (curBlockSize/2) + parseInt((curBlockSize/2)*(startingSizeBuff/100.0)));
			towerConnect.AddBlock(curTower);
		}
		
		else if(type == "Passion")
		{
			passionBlockClone=Instantiate(passionPrefab,transform.position,transform.rotation);
			curTower=passionBlockClone.GetComponent("TowerBlock");
			curBlockSize= curTower.GetBlockSize();
			curTower.SetBlockSize( (curBlockSize/2) + parseInt((curBlockSize/2)*(startingSizeBuff/100.0)));
			towerConnect.AddBlock(curTower);
		}
		
		
	}
		
